# while 循环
n=1
sum=0
while n<=100:
    sum+=n
    n=n+1
print(sum)

# for循环
#遍历字符串
for st in 'hello world':
    print(st)
print('--------')
# 遍历列表
list1=['a','b','c']
for i in list1:
    print(i)
print('--------')
for k in range(0,len(list1)):
    print(k,list1[k])
print(k)
print('--------')
sum1=0
for i in range(1,101):
    # print(i)
    sum1+=i
print(sum1)